#! /bin/sh
# python-dev environment,
# 0.update system
sudo apt-get update
# 1.mysql
./mysql.sh
# 2.nginx
sudo apt-get install -y nginx

# 3.supervisor
sudo apt-get install -y supervisor
# 5.sudo apt-get install python-dev libmysqlclient-dev
sudo apt-get install -y python-dev libmysqlclient-dev build-essential
# 6. install setuptools and pip
mkdir download_files; cd download_files;
wget https://pypi.python.org/packages/source/s/setuptools/setuptools-18.3.2.tar.gz https://pypi.python.org/packages/source/p/pip/pip-7.1.2.tar.gz
tar -zxvf setuptools-18.3.2.tar.gz pip-7.1.2.tar.gz
cd setuptools-18.3.2; python setup.py install;cd ..
cd pip-7.1.2; python setup.py install;cd ..
cd ..; rm -rf download_files;

# 7.python requirements pip install argparse requests futures torndb pycrypto mysql-python==1.2.5 tornado==4.0.2
pip install argparse requests futures torndb pycrypto mysql-python==1.2.5 tornado==4.0.2
